home *** CD-ROM | disk | FTP | other *** search
/ PC-X 1997 October / pcx14_9710.iso / swag / delphi.swg / 0015_How to keep the app iconized.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1995-11-22  |  534 b   |  26 lines

  1.  
  2. iconized apps
  3.  
  4. Q:  How do I keep the form in icon form when I run it?  
  5.  
  6. A:  
  7.  
  8. 1.  You must set WindowState to wsMinimized in the form's properties.
  9.  
  10. 2.  In the private section of the form object's declaration, put:
  11.  
  12.       PROCEDURE WMQueryOpen(VAR Msg : TWMQueryOpen); message WM_QUERYOPEN;
  13.  
  14. 3.  In the implementation section, put this method:
  15.  
  16.       PROCEDURE TForm1.WMQueryOpen(VAR Msg : TWMQueryOpen);
  17.       begin
  18.         Msg.Result := 0;
  19.       end;
  20.  
  21. That's it! The form will always remain iconic. 
  22.  
  23.  
  24.  
  25.  
  26.